﻿using B.S.DataBase.MyProject.Domain.SalesReports;
using B.S.DataBase.MyProject.ErrorCode;
using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using T.E.ERP.Read.API.Applicantions.Command.Kanbans;
using T.E.ERP.Read.API.Applicantions.Command.MyOrdermementCommands;
using T.E.ERP.Read.API.Applicantions.CommandHandler.KanbanHandler;
using T.E.ERP.Read.API.Dtos.Dtos;

namespace T.E.ERP.Read.API.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class SaleReturnsController : ControllerBase
    {
        private readonly IMediator mediator;

        public SaleReturnsController(IMediator mediator)
        {
            this.mediator = mediator;
        }
        /// <summary>
        /// 看板1
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public async Task<APIResult<List<string>>> GetSaleReturn()
        {
            SaleReturnsoneCommand command=new SaleReturnsoneCommand();
            return await mediator.Send(command);
        }
        /// <summary>
        /// 看板2
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public async Task<APIResult<List<SalesReturns>>> GetKanban2()
        {
            templateCommand2 command=new templateCommand2();
            return await mediator.Send(command);
        }
        /// <summary>
        /// 看板3
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public async Task<APIResult<List<MaterialRuNumDto>>> GetKanban()
        {
            templateCommand3 command=new templateCommand3();
            return await mediator.Send(command);
        }
        /// <summary>
        /// 看板4
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public async Task<APIResult<List<MaterialInOutDto>>> GetKanban4()
        {
            TemplateCommand4 command=new TemplateCommand4();
            return await mediator.Send(command);
        }
    }
}
